|
Microwave filters GUI
2.0.3
|
GUI dialog to contain plot. More...

Public Member Functions | |
| def | __init__ |
| Constructor: Creates PyQt4.QtGui.Qdialog window containing PyQt4.Qwt5.QwtPlot widget. | |
| def | addTab |
| Adds new tab with plot. | |
| def | addMask |
| Add specification mask. | |
| def | deleteMasks |
| Delete all masks. | |
| def | update |
| Update an existing plot with new data. | |
| def | deleteLastMarker |
| Deletes the last marker appended to current tab. | |
| def | selectMarker |
| Returns marker closer to the mouse cursor in screen coordinates, if distance is smaller than marker radius. | |
| def | deleteMarker |
| Deletes marker if a marker is selected. | |
| def | selectAndHighlightMarker |
| Selects a marker, highlights it and enables marker movement. | |
| def | hightlightMarker |
| Highlights marker and enables marker movement. | |
| def | deselectMarker |
| Deselect marker and mouse dragging. | |
| def | shiftMarker |
| Shifts marker if a marker is selected. | |
| def | dragMarker |
| Drags marker if a marker is selected. | |
| def | addMarker |
| Add marker at the curve point with is closer to the mouse cursor, if distance is smaller than marker radius. | |
| def | closeEvent |
| Reimplementation of the window close function. | |
| def | getScaleMaxMin |
| Get actual max and min values of scaling for a given axis. | |
| def | getManualScale |
| Get max and min manual scaling values for a given axis. | |
| def | getPrecision |
| Compute the required number of significant digits of markers labels, depending on axis scaling. | |
| def | updateMoveKnobRange |
| Update markerMove Knob limits according to actual xBottom scale. | |
| def | changeCurveVisibility |
| Change visibility of curves of an existing plot. | |
| def | autoScaleSomeAxis |
| Autoscale some axis. | |
Functions automatically executed when the user interacts with the GUI | |
| def | on_moveKnob_valueChanged |
| This function is automatically executed when the user moves the moveKnob. | |
| def | setCurveVisibility |
| Change curve visibility by using the EditCurvesDlg dialog. | |
| def | setCurveWidth |
| Change curve pen width by using the EditCurvesDlg dialog. | |
| def | setCurveColor |
| Change curve pen color by using the EditCurvesDlg dialog. | |
| def | showCurve |
| Change curve visibility by checking legend items. | |
| def | updateManualAxisScaling |
| Change scaling of a given axis according to manual scaling control values. | |
| def | setManualScaling |
| Set manaul/auto axis scaling. | |
| def | setAutoScaling |
| Axis auto scake. | |
| def | on_tabWidget_currentChanged |
| Disable main window actions actionZoom and actionCurves. | |
| def | on_actionPrint_triggered |
| Print [S] parameters plot. | |
| def | on_actionAbout_triggered |
| Display About dialog. | |
| def | on_actionPDF_triggered |
| Save [S] parameters plot to PDF file. | |
| def | on_actionZoom_toggled |
| Enable or disable zoom. | |
| def | on_actionNewMarker_toggled |
| Allow adding markers with mouse click. | |
| def | on_actionDeleteMarker_toggled |
| Delete markers with mouse click. | |
| def | on_actionMoveMarker_toggled |
| Move marker. | |
| def | on_actionCurves_toggled |
| Set curves visibility. | |
| def | on_actionScaleAxis_toggled |
| Axis scaling. | |
GUI dialog to contain plot.
Uses pyqwt5, the python binding of qwt5 C++ library for Qt applications.
| def dbplot.DbPlot.__init__ | ( | self, | |
| XData, | |||
| leftYData, | |||
rightXData = None, |
|||
rightYData = None, |
|||
leftWidth = None, |
|||
rightWidth = None, |
|||
leftYmin = None, |
|||
leftYmax = None, |
|||
rightYmin = None, |
|||
rightYmax = None, |
|||
Xmin = None, |
|||
Xmax = None, |
|||
windowTitle = None, |
|||
tabTitle = None, |
|||
title = None, |
|||
leftYNames = None, |
|||
rightYNames = None, |
|||
leftYVisible = None, |
|||
rightYVisible = None, |
|||
XLabel = None, |
|||
leftYLabel = None, |
|||
rightYLabel = None, |
|||
leftYColors = None, |
|||
rightYColors = None, |
|||
textLabel = None, |
|||
Xunits = None, |
|||
leftYunits = None, |
|||
rightYunits = None, |
|||
parent = None |
|||
| ) |
Constructor: Creates PyQt4.QtGui.Qdialog window containing PyQt4.Qwt5.QwtPlot widget.
Uses pyqwt5, the python binding of qwt5 C++ library for Qt applications.
@param XData = List of X-axis data (list of numpy arrays).
Each element in the list is the x-axis data for the corresponding element in leftYData.
When there is only one curve, it is not necessary to create a list of curves: XData argument can be the curve x-data alone.
@param leftYData = List of curve-data to plot in left y-axis (list of numpy arrays).
Curve-data can be a list of int or float or a numpy array.
If a list element is a 2-D numpy array, it defines a curve family sharing the same curve properties.
Curves in a curve family have Ydata in the columns of the 2-D numpy array.
When there is only one curve, it is not necessary to create a list of curves: leftYData argument can be the curve-data alone.
@param rightXData = List of X-axis data (list of numpy arrays).
Each element in the list is the x-axis data for the corresponding element in rightYData.
When there is only one curve, it is not necessary to create a list of curves: rightXData argument can be the curve x-data alone.
If equal to None, XData is used both for left-y and right-y axis data.
Default None.
@param rightYData = List of curve-data to plot in right y-axis (list of numpy arrays).
Curve-data can be a list of int or float or a numpy array.
If a list element is a 2-D numpy array, it defines a curve family sharing the same curve properties.
Curves in a curve family have Ydata in the columns of the 2-D numpy array.
When there is only one curve, it is not necessary to create a list of curves: rightYData argument can be the curve-data alone.
If it is equal to None, there is no data in the right-Y axis. Default None.
@param leftYmin = Set manual scaling for left-y axis with this minimum value.
@param leftYmax = Set manual scaling for left-y axis with this maximum value.
@param rightYmin = Set manual scaling for right-y axis with this minimum value.
@param rightYmax = Set manual scaling for right-y axis with this maximum value.
@param Xmin = Set manual scaling for x axis with this minimum value.
@param Xmax = Set manual scaling for x axis with this maximum value.
@param windowTitle = Window title (string). Default None.
@param tabTitle = Tab title (string). Default None.
@param title = Plot title (string). Default None.
@param leftYNames = List of names corresponding to leftYData (list of strings).
If equal to None, no legend is created. Default None.
@param rightYNames = List of names corresponding to rightYData (list of strings).
If equal to None, no legend is created. Default None.
@param leftYVisible = List of visibility flags corresponding to leftYData (list of bool).
If equal to None, all curves are visible. Default None.
@param rightYVisible = List of visibility flags corresponding to rightYData (list of bool).
If equal to None, all curves are visible. Default None.
@param XLabel = X-axis label (string). Default None.
@param leftYLabel = Left y-axis label (string). Default None.
@param rightYLabel = Right y-axis label (string). Default None.
@param leftYColors = List of colors corresponding to leftYData (list of Qt.QColor instances, like Qt.red or Qt.blue).
If equal to None, default colors are used. Default None.
@param rightYColors = List of colors corresponding to rightYData (list of Qt.QColor instances, like Qt.red or Qt.blue).
If equal to None, default colors are used. Default None.
@param Xunits = X-axis units for markers (string). If equal to None, no units are displayed. Default None.
@param leftYunits = Ledt Y-axis units for markers and tracker (string). If equal to None, no units are displayed. Default None.
@param rightYunits = Right Y-axis units for markers and tracker (string). If equal to None, no units are displayed. Default None.
@param textLabel = Text to display as a label (string). Can be multiline. Default None.
@param parent = Parent widget, in this case is mainWindow. Default None.Move marker knob Number of TabWidgets List of QwtPlot class instances Left axis zoomer. List for all Tabs. Right axis zoomer. List for all Tabs. Left axis picker. List for all Tabs. Axis scaling dialog. List for all Tabs. Current instance of scalingDlg class, if the scalingDlg window is open, None if it is closed. Dialog for setting curves visibility. List for all Tabs. Current instance of EditCurvesDlg class, if the setCurves window is open, None if it is closed. List of curves in left y-axis. List for all Tabs. List of curves in right y-axis. List for all Tabs. List of specification masks. List for all Tabs. List of markers. List for all Tabs. List of XData. List for all Tabs. List of leftYData. List for all Tabs. List of rightXData. List for all Tabs. List of rightYData. List for all Tabs. List of left y-axis curve names. List for all Tabs. List of right y-axis curve names. List for all Tabs. List of mask names. List for all Tabs. Legend for each plot. List for all Tabs. Zoomer base for autoscaling. List for all Tabs. X-axis units for markers. List for all Tabs. Left Y-axis units for markers. List for all Tabs. Right Y-axis units for markers. List for all Tabs. Marker to move Size of curve symbols, when curve points are visible for adding new marker. Number of x-axis significant digits required to display markers and tracker labels, depending on axis scaling. List for all Tabs. Number of left- y axis significant digits required to display markers and tracker labels, depending on axis scaling. List for all Tabs. Flag that is True when the program processes mouse dragging. If True, LeftButton clicks are discarded. Link to the mainWindow. Flag that will be set to true when the window is closed, in order to allow reconstruction of the class instead of updating the plot when execute or compute buttons are clicked in other windows.
Definition at line 109 of file dbplot.py.
References dbplot.DbPlot.addTab(), dbplot.DbPlot.autoScaleBase, dbplot.DbPlot.closed, dbplot.DbPlot.curveSymbolSize, dbplot.DbPlot.draggingMode, dbplot.DbPlot.hPlot, dbplot.DbPlot.label, dbplot.DbPlot.leftYCurves, dbplot.DbPlot.leftYData, dbplot.DbPlot.leftYNames, dbplot.DbPlot.leftYunits, dbplot.DbPlot.legends, dbplot.DbPlot.mainWindow, dbplot.DbPlot.markerMove, dbplot.DbPlot.markers, dbplot.DbPlot.maskNames, dbplot.DbPlot.masks, dbplot.DbPlot.moveKnob, dbplot.DbPlot.Ntabs, dbplot.DbPlot.on_moveKnob_valueChanged(), dbplot.DbPlot.pickerLeft, dbplot.DbPlot.precX, dbplot.DbPlot.precY, dbplot.DbPlot.rightXData, dbplot.DbPlot.rightYCurves, dbplot.DbPlot.rightYData, dbplot.DbPlot.rightYNames, dbplot.DbPlot.rightYunits, dbplot.DbPlot.scalingDlg, dbplot.DbPlot.scalingDlgCurrent, dbplot.DbPlot.setCurves, dbplot.DbPlot.setCurvesCurrent, dbplot.DbPlot.XData, dbplot.DbPlot.Xunits, dbplot.DbPlot.zoomerLeft, and dbplot.DbPlot.zoomerRight.

| def dbplot.DbPlot.addMarker | ( | self, | |
| point | |||
| ) |
Add marker at the curve point with is closer to the mouse cursor, if distance is smaller than marker radius.
Both left-y and right-y axis curves are processed.
| point | = Point coordinates (QPoint) |
Definition at line 1160 of file dbplot.py.
References dbplot.DbPlot.curveSymbolSize, dbplot.DbPlot.hPlot, dbplot.DbPlot.leftYCurves, dbplot.DbPlot.markers, and dbplot.DbPlot.rightYCurves.
| def dbplot.DbPlot.addMask | ( | self, | |
| nTab, | |||
| XData, | |||
| YData, | |||
| axis, | |||
| name, | |||
| color, | |||
| type, | |||
visible = True, |
|||
transpar = 64 |
|||
| ) |
Add specification mask.
In order to split the mask into separated parts, use numpy NaN in y-axis (numpy.nan), as show in the example at the end of this file.
| nTab | = TabWidget page index. |
| XData | = x data (float numpy array). |
| YData | = y data (float numpy array). |
| axis | = 'left' or 'right' (string). Y-axis to which the YData values correspond. |
| name | = String to display in legend |
| color | = Qt.QColor instance, like Qt.red or Qt.blue |
| type | = 'upper' or 'lower' (string). |
| visible | = Visibility flag. If True the mask curve is initially visible, otherwise it is hidden. Default True. |
| transpar | = Alpha value for transparency (255=opaque, 0=transparent). Default 64. |
Definition at line 724 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.legends, dbplot.DbPlot.maskNames, and dbplot.DbPlot.masks.
| def dbplot.DbPlot.addTab | ( | self, | |
| XData, | |||
| leftYData, | |||
rightXData = None, |
|||
rightYData = None, |
|||
leftWidth = None, |
|||
rightWidth = None, |
|||
leftYmin = None, |
|||
leftYmax = None, |
|||
rightYmin = None, |
|||
rightYmax = None, |
|||
Xmin = None, |
|||
Xmax = None, |
|||
tabTitle = None, |
|||
title = None, |
|||
leftYNames = None, |
|||
rightYNames = None, |
|||
leftYVisible = None, |
|||
rightYVisible = None, |
|||
XLabel = None, |
|||
leftYLabel = None, |
|||
rightYLabel = None, |
|||
leftYColors = None, |
|||
rightYColors = None, |
|||
Xunits = None, |
|||
leftYunits = None, |
|||
rightYunits = None, |
|||
replaceTab = None |
|||
| ) |
Adds new tab with plot.
| XData | = List of X-axis data (list of numpy arrays). Each element in the list is the x-axis data for the corresponding element in leftYData. When there is only one curve, it is not necessary to create a list of curves: XData argument can be the curve x-data alone. |
| leftYData | = List of curve-data to plot in left y-axis (list of numpy arrays). Curve-data can be a list of int or float or a numpy array. If a list element is a 2-D numpy array, it defines a curve family sharing the same curve properties. Curves in a curve family have Ydata in the columns of the 2-D numpy array. When there is only one curve, it is not necessary to create a list of curves: leftYData argument can be the curve-data alone. |
| rightXData | = List of X-axis data (list of numpy arrays). Each element in the list is the x-axis data for the corresponding element in rightYData. When there is only one curve, it is not necessary to create a list of curves: rightXData argument can be the curve x-data alone. If equal to None, XData is used both for left-y and right-y axis data. Default None. |
| rightYData | = List of curve-data to plot in right y-axis (list of numpy arrays). Curve-data can be a list of int or float or a numpy array. If a list element is a 2-D numpy array, it defines a curve family sharing the same curve properties. Curves in a curve family have Ydata in the columns of the 2-D numpy array. When there is only one curve, it is not necessary to create a list of curves: rightYData argument can be the curve-data alone. If it is equal to None, there is no data in the right-Y axis. Default None. |
| leftYmin | = Set manual scaling for left-y axis with this minimum value. |
| leftYmax | = Set manual scaling for left-y axis with this maximum value. |
| rightYmin | = Set manual scaling for right-y axis with this minimum value. |
| rightYmax | = Set manual scaling for right-y axis with this maximum value. |
| Xmin | = Set manual scaling for x axis with this minimum value. |
| Xmax | = Set manual scaling for x axis with this maximum value. |
| tabTitle | = Tab title (string). Default None. |
| title | = Plot title (string). Default None. |
| leftYNames | = List of names corresponding to leftYData (list of strings). If equal to None, no legend is created. Default None. |
| rightYNames | = List of names corresponding to rightYData (list of strings). If equal to None, no legend is created. Default None. |
| leftYVisible | = List of visibility flags corresponding to leftYData (list of bool). If equal to None, all curves are visible. Default None. |
| rightYVisible | = List of visibility flags corresponding to rightYData (list of bool). If equal to None, all curves are visible. Default None. |
| XLabel | = X-axis label (string). Default None. |
| leftYLabel | = Left y-axis label (string). Default None. |
| rightYLabel | = Right y-axis label (string). Default None. |
| leftYColors | = List of colors corresponding to leftYData (list of Qt.QColor instances, like Qt.red or Qt.blue). If equal to None, default colors are used. Default None. |
| rightYColors | = List of colors corresponding to rightYData (list of Qt.QColor instances, like Qt.red or Qt.blue). If equal to None, default colors are used. Default None. |
| Xunits | = X-axis units for markers (string). If equal to None, no units are displayed. Default None. |
| leftYunits | = Left Y-axis units for markers and tracker (string). If equal to None, no units are displayed. Default None. |
| rightYunits | = Right Y-axis units for markers and tracker (string). If equal to None, no units are displayed. Default None. |
| replaceTab | = If not None, it is the index of an already existing Tab and all the CurveFamilies have to be replaced with data from the function arguments. Default False. |
Definition at line 342 of file dbplot.py.
References dbplot.DbPlot.autoScaleBase, dbplot.DbPlot.getPrecision(), dbplot.DbPlot.getScaleMaxMin(), dbplot.DbPlot.hPlot, dbplot.DbPlot.leftYCurves, dbplot.DbPlot.leftYData, dbplot.DbPlot.leftYunits, dbplot.DbPlot.legends, dbplot.DbPlot.markers, dbplot.DbPlot.masks, dbplot.DbPlot.Ntabs, dbplot.DbPlot.on_actionDeleteMarker_toggled(), dbplot.DbPlot.on_actionMoveMarker_toggled(), dbplot.DbPlot.on_actionNewMarker_toggled(), dbplot.DbPlot.on_actionZoom_toggled(), dbplot.DbPlot.on_tabWidget_currentChanged(), dbplot.DbPlot.pickerLeft, dbplot.DbPlot.precX, dbplot.DbPlot.precY, dbplot.DbPlot.rightXData, dbplot.DbPlot.rightYCurves, dbplot.DbPlot.rightYData, dbplot.DbPlot.rightYunits, dbplot.DbPlot.scalingDlg, dbplot.DbPlot.setAutoScaling(), dbplot.DbPlot.setCurves, dbplot.DbPlot.setManualScaling(), dbplot.DbPlot.showCurve(), dbplot.DbPlot.updateManualAxisScaling(), dbplot.DbPlot.updateMoveKnobRange(), dbplot.DbPlot.XData, dbplot.DbPlot.Xunits, dbplot.DbPlot.zoomerLeft, and dbplot.DbPlot.zoomerRight.
Referenced by dbplot.DbPlot.__init__().


| def dbplot.DbPlot.autoScaleSomeAxis | ( | self, | |
| nTab, | |||
| autoScaleBottomX, | |||
| autoScaleLeftY, | |||
| autoScaleRightY | |||
| ) |
Autoscale some axis.
This function is intended to be called after calling self.update when the programmer wishes to autoscale axis after update.
| nTab | = Tab index where to autoscale axis. |
| autoScaleX | = Flag to indicate if bottom X axis must be autoscaled (True | False). |
| autoScaleLeftY | = Flag to indicate if left Y axis must be autoscaled (True | False). |
| autoScaleRightY | = Flag to indicate if right Y axis must be autoscaled (True | False). |
Definition at line 1386 of file dbplot.py.
References dbplot.DbPlot.autoScaleBase, dbplot.DbPlot.getPrecision(), dbplot.DbPlot.hPlot, and dbplot.DbPlot.scalingDlg.

| def dbplot.DbPlot.changeCurveVisibility | ( | self, | |
| nTab, | |||
leftYVisible = None, |
|||
rightYVisible = None, |
|||
masksVisible = None |
|||
| ) |
Change visibility of curves of an existing plot.
| nTab | = Tab index |
| leftYVisible | = List of visibility flags corresponding to leftYData curves (list of bool or None values). Instead of a list of flags, it can be a dictionary of the form { curveName: flag, ... }. Curves corresponding to a missing dictionary key are not changed. If a flag is None, the visibility of the corresponding curve is not changed. If the parameter is equal to None, leftYData curves visibility is not changed. Default None. |
| rightYVisible | = List of visibility flags corresponding to rightYData curves (list of bool or None values). Instead of a list of flags, it can be a dictionary of the form { curveName: flag, ... }. Curves corresponding to a missing dictionary key are not changed. If a flag is None, the visibility of the corresponding curve is not changed. If the parameter is equal to None, rightYData curves visibility is not changed. Default None. |
| masksVisible | = List of visibility flags corresponding to mask curves (list of bool or None values). Instead of a list of flags, it can be a dictionary of the form { curveName: flag, ... }. Curves corresponding to a missing dictionary key are not changed. If a flag is None, the visibility of the corresponding curve is not changed. If the parameter is equal to None, mask curves visibility is not changed. Default None. |
Definition at line 1320 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.leftYCurves, dbplot.DbPlot.leftYNames, dbplot.DbPlot.legends, dbplot.DbPlot.maskNames, dbplot.DbPlot.masks, dbplot.DbPlot.rightYCurves, dbplot.DbPlot.rightYNames, and dbplot.DbPlot.setCurves.
| def dbplot.DbPlot.closeEvent | ( | self, | |
| event | |||
| ) |
Reimplementation of the window close function.
Sets closed attribute to True.
Definition at line 1218 of file dbplot.py.
References dbplot.DbPlot.closed.
| def dbplot.DbPlot.deleteMarker | ( | self, | |
| point | |||
| ) |
Deletes marker if a marker is selected.
| point | = Point coordinates (QPoint) |
Definition at line 1014 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.markers, and dbplot.DbPlot.selectMarker().

| def dbplot.DbPlot.deleteMasks | ( | self | ) |
Delete all masks.
Does nothing if there are no masks.
Definition at line 777 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.maskNames, dbplot.DbPlot.masks, and dbplot.DbPlot.Ntabs.
| def dbplot.DbPlot.dragMarker | ( | self, | |
| point | |||
| ) |
Drags marker if a marker is selected.
| point | = Point coordinates (QPoint) |
Definition at line 1129 of file dbplot.py.
References dbplot.DbPlot.hPlot, and dbplot.DbPlot.markerMove.
| def dbplot.DbPlot.getManualScale | ( | self, | |
| nTab, | |||
| axis | |||
| ) |
Get max and min manual scaling values for a given axis.
| nTab | = tab index |
| axis | = QwtPlot axis (Qwt.QwtPlot.yLeft, Qwt.QwtPlot.yRight, Qwt.QwtPlot.xBottom). |
Definition at line 1252 of file dbplot.py.
References dbplot.DbPlot.scalingDlg.
Referenced by dbplot.DbPlot.updateManualAxisScaling().

| def dbplot.DbPlot.getPrecision | ( | self, | |
| nTab | |||
| ) |
Compute the required number of significant digits of markers labels, depending on axis scaling.
param nTab = Tab widget index.
Definition at line 1271 of file dbplot.py.
References dbplot.DbPlot.getScaleMaxMin(), dbplot.DbPlot.markers, dbplot.DbPlot.precX, and dbplot.DbPlot.precY.
Referenced by dbplot.DbPlot.addTab(), dbplot.DbPlot.autoScaleSomeAxis(), dbplot.DbPlot.setAutoScaling(), and dbplot.DbPlot.updateManualAxisScaling().


| def dbplot.DbPlot.getScaleMaxMin | ( | self, | |
| nTab, | |||
| axis | |||
| ) |
Get actual max and min values of scaling for a given axis.
It is a separate function to encapsulate the different method names for qwt5.1 and qwt5.2
| nTab | = Tab index |
| axis | = QwtPlot axis (Qwt.QwtPlot.yLeft, Qwt.QwtPlot.yRight, Qwt.QwtPlot.xBottom). |
Definition at line 1232 of file dbplot.py.
References dbplot.DbPlot.hPlot.
Referenced by dbplot.DbPlot.addTab(), dbplot.DbPlot.getPrecision(), dbplot.DbPlot.selectMarker(), dbplot.DbPlot.update(), and dbplot.DbPlot.updateMoveKnobRange().

| def dbplot.DbPlot.hightlightMarker | ( | self, | |
| nTab, | |||
| markerMove | |||
| ) |
Highlights marker and enables marker movement.
| nTab | = Tab index |
| markerMove | = Marker to move (PlotMarker) |
Definition at line 1061 of file dbplot.py.
References dbplot.DbPlot.draggingMode, dbplot.DbPlot.hPlot, and dbplot.DbPlot.markerMove.
Referenced by dbplot.DbPlot.on_actionMoveMarker_toggled(), and dbplot.DbPlot.selectAndHighlightMarker().

| def dbplot.DbPlot.on_actionAbout_triggered | ( | self, | |
| checked | |||
| ) |
| def dbplot.DbPlot.on_actionCurves_toggled | ( | self, | |
| checked | |||
| ) |
Set curves visibility.
This function is automatically executed by the GUI when the user toggles the 'Set curves visibility' button.
Definition at line 1827 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.setCurves, and dbplot.DbPlot.setCurvesCurrent.
Referenced by dbplot.DbPlot.on_tabWidget_currentChanged().

| def dbplot.DbPlot.on_actionDeleteMarker_toggled | ( | self, | |
| checked | |||
| ) |
Delete markers with mouse click.
This function is automatically executed by the GUI when the user toggles the 'Delete Marker' button.
Definition at line 1756 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.markers, dbplot.DbPlot.on_actionDeleteMarker_toggled(), dbplot.DbPlot.on_actionZoom_toggled(), and dbplot.DbPlot.pickerLeft.
Referenced by dbplot.DbPlot.addTab(), dbplot.DbPlot.on_actionDeleteMarker_toggled(), and dbplot.DbPlot.on_tabWidget_currentChanged().


| def dbplot.DbPlot.on_actionMoveMarker_toggled | ( | self, | |
| checked | |||
| ) |
Move marker.
This function is automatically executed by the GUI when the user toggles the 'Move Marker' button.
Definition at line 1788 of file dbplot.py.
References dbplot.DbPlot.deselectMarker(), dbplot.DbPlot.hightlightMarker(), dbplot.DbPlot.hPlot, dbplot.DbPlot.markers, dbplot.DbPlot.on_actionMoveMarker_toggled(), dbplot.DbPlot.on_actionZoom_toggled(), and dbplot.DbPlot.pickerLeft.
Referenced by dbplot.DbPlot.addTab(), dbplot.DbPlot.on_actionMoveMarker_toggled(), and dbplot.DbPlot.on_tabWidget_currentChanged().


| def dbplot.DbPlot.on_actionNewMarker_toggled | ( | self, | |
| checked | |||
| ) |
Allow adding markers with mouse click.
This function is automatically executed by the GUI when the user toggles the 'New Marker' button.
Definition at line 1711 of file dbplot.py.
References dbplot.DbPlot.curveSymbolSize, dbplot.DbPlot.hPlot, dbplot.DbPlot.leftYCurves, dbplot.DbPlot.on_actionZoom_toggled(), dbplot.DbPlot.pickerLeft, and dbplot.DbPlot.rightYCurves.
Referenced by dbplot.DbPlot.addTab(), and dbplot.DbPlot.on_tabWidget_currentChanged().


| def dbplot.DbPlot.on_actionPDF_triggered | ( | self, | |
| checked | |||
| ) |
Save [S] parameters plot to PDF file.
This function is automatically executed by the GUI when the user triggers the 'PDF' action.
Definition at line 1653 of file dbplot.py.
References dbplot.DbPlot.hPlot.
| def dbplot.DbPlot.on_actionPrint_triggered | ( | self, | |
| checked | |||
| ) |
Print [S] parameters plot.
This function is automatically executed by the GUI when the user triggers the 'Print' action.
Definition at line 1609 of file dbplot.py.
References dbplot.DbPlot.hPlot.
| def dbplot.DbPlot.on_actionScaleAxis_toggled | ( | self, | |
| checked | |||
| ) |
Axis scaling.
This function is automatically executed by the GUI when the user toggles the 'Axis scale' button.
Definition at line 1846 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.on_actionZoom_toggled(), dbplot.DbPlot.scalingDlg, and dbplot.DbPlot.scalingDlgCurrent.
Referenced by dbplot.DbPlot.on_actionZoom_toggled(), and dbplot.DbPlot.on_tabWidget_currentChanged().


| def dbplot.DbPlot.on_actionZoom_toggled | ( | self, | |
| checked | |||
| ) |
Enable or disable zoom.
This function is automatically executed by the GUI when the user toggles the 'Zoom' button.
Definition at line 1675 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.on_actionScaleAxis_toggled(), dbplot.DbPlot.scalingDlg, dbplot.DbPlot.zoomerLeft, and dbplot.DbPlot.zoomerRight.
Referenced by dbplot.DbPlot.addTab(), dbplot.DbPlot.on_actionDeleteMarker_toggled(), dbplot.DbPlot.on_actionMoveMarker_toggled(), dbplot.DbPlot.on_actionNewMarker_toggled(), dbplot.DbPlot.on_actionScaleAxis_toggled(), and dbplot.DbPlot.on_tabWidget_currentChanged().


| def dbplot.DbPlot.on_moveKnob_valueChanged | ( | self, | |
| value | |||
| ) |
This function is automatically executed when the user moves the moveKnob.
This slot must be manually connected to valueChanged, since the QwtKnob widget was not created in QtDesigner.
| value | = Knob value (double) |
Definition at line 1421 of file dbplot.py.
References dbplot.DbPlot.hPlot.
Referenced by dbplot.DbPlot.__init__().

| def dbplot.DbPlot.on_tabWidget_currentChanged | ( | self, | |
| index | |||
| ) |
Disable main window actions actionZoom and actionCurves.
This function is automatically executed by the GUI when the user changes the current tab page.
Definition at line 1572 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.on_actionCurves_toggled(), dbplot.DbPlot.on_actionDeleteMarker_toggled(), dbplot.DbPlot.on_actionMoveMarker_toggled(), dbplot.DbPlot.on_actionNewMarker_toggled(), dbplot.DbPlot.on_actionScaleAxis_toggled(), dbplot.DbPlot.on_actionZoom_toggled(), dbplot.DbPlot.scalingDlgCurrent, dbplot.DbPlot.setCurves, dbplot.DbPlot.setCurvesCurrent, and dbplot.DbPlot.updateMoveKnobRange().
Referenced by dbplot.DbPlot.addTab().


| def dbplot.DbPlot.selectAndHighlightMarker | ( | self, | |
| point | |||
| ) |
Selects a marker, highlights it and enables marker movement.
| point | = Point coordinates (QPoint) |
Definition at line 1047 of file dbplot.py.
References dbplot.DbPlot.hightlightMarker(), and dbplot.DbPlot.selectMarker().

| def dbplot.DbPlot.selectMarker | ( | self, | |
| nTab, | |||
| point | |||
| ) |
Returns marker closer to the mouse cursor in screen coordinates, if distance is smaller than marker radius.
| nTab | = Tab index |
| point | = Point coordinates (QPoint) |
Definition at line 962 of file dbplot.py.
References dbplot.DbPlot.getScaleMaxMin(), dbplot.DbPlot.hPlot, and dbplot.DbPlot.markers.
Referenced by dbplot.DbPlot.deleteMarker(), and dbplot.DbPlot.selectAndHighlightMarker().


| def dbplot.DbPlot.setAutoScaling | ( | self, | |
| axis, | |||
| groupBox | |||
| ) |
Axis auto scake.
This function is automatically executed by the GUI when the user presses the 'Auto' buttom of some axis.
| axis | = QwtPlot axis (Qwt.QwtPlot.yLeft, Qwt.QwtPlot.yRight, Qwt.QwtPlot.xBottom) |
| groupBox | = Manual scaling groupBox, that will be unchecked. |
Definition at line 1552 of file dbplot.py.
References dbplot.DbPlot.autoScaleBase, dbplot.DbPlot.getPrecision(), and dbplot.DbPlot.hPlot.
Referenced by dbplot.DbPlot.addTab().


| def dbplot.DbPlot.setCurveColor | ( | self, | |
| checked | |||
| ) |
Change curve pen color by using the EditCurvesDlg dialog.
self.setCurves.curvesPushButtonsDict is used to find the QwtPlotCurve corresponding to the self.setCurves pushButton that sent the signal.
| checked | = Check state of the pushButton that sent the signal. |
Definition at line 1485 of file dbplot.py.
References dbplot.DbPlot.hPlot, and dbplot.DbPlot.setCurves.
| def dbplot.DbPlot.setCurveVisibility | ( | self, | |
| value | |||
| ) |
Change curve visibility by using the EditCurvesDlg dialog.
self.setCurves.curvesCheckBoxesDict is used to find the QwtPlotCurve corresponding to the self.setCurves checkBox that sent the signal.
| value | = State of the checkBox that sent the signal. |
Definition at line 1447 of file dbplot.py.
References dbplot.DbPlot.hPlot, dbplot.DbPlot.markers, and dbplot.DbPlot.setCurves.
| def dbplot.DbPlot.setCurveWidth | ( | self, | |
| value | |||
| ) |
Change curve pen width by using the EditCurvesDlg dialog.
self.setCurves.curvesCheckBoxesDict is used to find the QwtPlotCurve corresponding to the self.setCurves spinBox that sent the signal.
| value | = Value of the spinBox that sent the signal. |
Definition at line 1470 of file dbplot.py.
References dbplot.DbPlot.hPlot, and dbplot.DbPlot.setCurves.
| def dbplot.DbPlot.setManualScaling | ( | self, | |
| value, | |||
| axis | |||
| ) |
Set manaul/auto axis scaling.
| value | = Value of axis manual scaling group CheckBox (int). 0 -> False (auto), 2 -> True (manual). |
| axis | = QwtPlot axis (Qwt.QwtPlot.yLeft, Qwt.QwtPlot.yRight, Qwt.QwtPlot.xBottom). |
Definition at line 1533 of file dbplot.py.
References dbplot.DbPlot.hPlot, and dbplot.DbPlot.updateManualAxisScaling().
Referenced by dbplot.DbPlot.addTab().


| def dbplot.DbPlot.shiftMarker | ( | self, | |
| increment | |||
| ) |
Shifts marker if a marker is selected.
| increment | = Number of curve points to shift (int) |
Definition at line 1107 of file dbplot.py.
References dbplot.DbPlot.markerMove.
| def dbplot.DbPlot.showCurve | ( | self, | |
| item, | |||
| on | |||
| ) |
Change curve visibility by checking legend items.
| value | = State of the legendItem that sent the signal. |
Definition at line 1503 of file dbplot.py.
References dbplot.DbPlot.hPlot, and dbplot.DbPlot.setCurves.
Referenced by dbplot.DbPlot.addTab().

| def dbplot.DbPlot.update | ( | self, | |
| nTab, | |||
| XData, | |||
| leftYData, | |||
rightXData = None, |
|||
rightYData = None, |
|||
textLabel = None, |
|||
autoScaleBottomX = False, |
|||
autoScaleLeftY = False, |
|||
autoScaleRightY = False |
|||
| ) |
Update an existing plot with new data.
The number of curves in the leftY and rightY axis must be the same as in the existing plot before update. A change in the number of curves will result in an assertion error.
| nTab | = TabWidget page index. |
| XData | = x-axis data (float numpy array or list of floats). |
| leftYData | = List of arrays to plot in left y-axis (list of numpy arrays or list of lists of floats). |
| rightXData | = x-axis data for right-axis curves (float numpy array or list of floats). If equal to None, XData is used both for left-y and right-y axis data. Default None. |
| rightYData | = List of arrays to plot in right y-axis (list of numpy arrays or list of lists of floats). Default None. |
| textLabel | = Text to display as a label (string). Can be multiline. Default None. |
Definition at line 800 of file dbplot.py.
References dbplot.DbPlot.autoScaleBase, dbplot.DbPlot.getScaleMaxMin(), dbplot.DbPlot.hPlot, dbplot.DbPlot.label, dbplot.DbPlot.leftYCurves, dbplot.DbPlot.legends, dbplot.DbPlot.markers, dbplot.DbPlot.masks, dbplot.DbPlot.rightYCurves, dbplot.DbPlot.scalingDlg, dbplot.DbPlot.zoomerLeft, and dbplot.DbPlot.zoomerRight.

| def dbplot.DbPlot.updateManualAxisScaling | ( | self, | |
| axis | |||
| ) |
Change scaling of a given axis according to manual scaling control values.
| axis | = QwtPlot axis (Qwt.QwtPlot.yLeft, Qwt.QwtPlot.yRight, Qwt.QwtPlot.xBottom). |
Definition at line 1519 of file dbplot.py.
References dbplot.DbPlot.getManualScale(), dbplot.DbPlot.getPrecision(), and dbplot.DbPlot.hPlot.
Referenced by dbplot.DbPlot.addTab(), and dbplot.DbPlot.setManualScaling().


1.8.1.2